home *** CD-ROM | disk | FTP | other *** search
- /*
-
- CFolder.h
- Superclass: CFile
-
- CFile plus directory manipulation.
-
- October 8, 1992 isl
-
- */
-
- #define _H_CIsleFile // Include this file only once
-
- #include <CFile.h> // Superclass definitions
-
- #define kRoot 1 // The root directory is always ID=1 (I hope)
- #define kDirectory -1 // Home directory index for directories
- #define kDefault 0 // Default specification
- #define kNone 0 // No data
- #define kFirst 1 // Start at the beginning
- #define kDirTest 16 // Test bit for a directory
- #define kInvisible 16384 // Test bit for invisibility
- #define kStationery 2048 // Test bit for a stationery file
- #define kFlagsOff 0x00000000 // Turn everything off
-
- #define kFailed -1 // An operation failed
-
- #define kNoSignature 0 // No owner signature
- #define kNoType 0 // No file type
- #define kGeneric '????' // Generic owner signature or type
-
- /*=====================*/
- /*===---------------===*/
-
- class CIsleFile : public CFile
- Begin
- public:
- Boolean fSuper; // Are System 7 goodies available?
- Boolean fGood; // Is the current information valid?
-
- public:
- void IIsleFile // Initialize the object
- ( void
- );
-
- virtual void CreateNew // Create a file at the current level, no user query
- ( OSType creator, // The file's creator
- OSType type // The file's type
- );
- virtual void ResolveFileAlias // Resolve specification if an alias
- ( void // No arguments
- );
- virtual void GetPath // Provide file's path as a string of characters
- ( Str255 path, // The string describing the path
- Str255 delimiter // The string describing path delimiters
- );
- virtual Boolean IsStationery // Is this file a stationery document?
- ( void // No arguments
- );
- virtual void GetMacCatInfo // Get current file or folder specifications
- ( CInfoPBPtr specs // The parameter block of file specifications
- );
- virtual void SetMacCatInfo // Get current file or folder specifications
- ( CInfoPBPtr specs // The parameter block of file specifications
- );
- virtual void SetMacFileInfo // Set the file information record
- ( FInfo* fileInfo // The information
- );
- virtual Boolean GoodType // Check the file type
- ( OSType fileType // The desired type
- );
- virtual void MakeStationery // Get current file or folder specifications
- ( Boolean fStatinery // Control toggle
- );
-
- virtual void FindCreatorType // Find a file by its creator and type
- ( short vRefNum, // The volume reference number
- long directory, // The directory
- OSType creator, // The creator of the file
- OSType type, // The type of the file
- Boolean inside // Should I check inside sub-directories?
- );
-
- virtual OSErr MakeFSSpec // Make a System7-like FSSpec record
- ( short vRefNum, // The volume reference number
- long directory, // The directory
- StringPtr leafName, // The name of the directory leaf
- short index, // The directory index
- FSSpec* fileSpec // The specification record
- );
-
- virtual void MoveToTrash // Move a file into the Trash
- ( void // No arguments
- );
-
- virtual void CreateUniqueNew // Create a uniquely named file
- ( OSType creator, // The file's creator
- OSType type // This file's type
- );
-
- private:
- virtual void CollectPath // Provide file's path as a string of characters
- ( Str255 path, // The string describing the path
- Str255 delimiter, // The string describing path delimiters
- FSSpec* leafSpec // Specification of a directory level
- );
- End;
-
- /*===---------------===*/
- /*=====================*/